#pragma once

class CCamera
{
private:
	//Camera Variables---------------------------------------------//

	D3DXVECTOR3		m_DefaultPosition;	//Default Camera Position//
	D3DXVECTOR3		m_DefaultLookAt;	//Default Camera Look At Vector//

	D3DXVECTOR3		m_MapPosition;		//Camera Postion while in Map Option//
	D3DXVECTOR3		m_MapLookAt;		//Camea Look At Vector while in Map Option//

	D3DXVECTOR3		m_Position;			//Modified Camera Position//
	D3DXVECTOR3		m_LookAt;			//Modified Look At Vector//

	D3DXVECTOR3		m_InputVector;		//Vector used to modify other vectors based on input//

public:
	CCamera()
	{
		m_DefaultPosition = D3DXVECTOR3(0.0f, 50.0f, 20.0f);
		m_DefaultLookAt = D3DXVECTOR3(0.0f, 0.0f, 0.0f);

		m_MapPosition = D3DXVECTOR3(0.0f, 200.0f, -50.0f);
		m_MapLookAt = D3DXVECTOR3(0.0f, 0.0f, -60.0f);

		m_Position = D3DXVECTOR3( 0.0f, 0.0f, 10.0f );
		m_LookAt = D3DXVECTOR3( 0.0f, 0.0f, 0.0f );
	}
	void SetPosition(float newX, float newY, float newZ)
	{
		m_Position.x = newX;
		m_Position.y = newY;
		m_Position.z = newZ;
	}
	void SetLookAt(float newX, float newY, float newZ)
	{
		m_LookAt.x = newX;
		m_LookAt.y = newY;
		m_LookAt.z = newZ;
	}
	void SetXZ(float newX, float newZ)
	{
		m_Position.x = newX;
		m_Position.z = newZ;
	}
	void SetY(float newY)
	{
		m_Position.y = newY;
	}
	void MoveLeft(float moveLeft)
	{
		m_Position += D3DXVECTOR3(moveLeft, 0.0f, 0.0f);
		m_LookAt += D3DXVECTOR3(moveLeft, 0.0f, 0.0f);
	}
	void MoveRight(float moveRight)
	{
		m_Position -= D3DXVECTOR3(moveRight, 0.0f, 0.0f);
		m_LookAt -= D3DXVECTOR3(moveRight, 0.0f, 0.0f);
	}
	void MoveForward(float moveForward)
	{
		m_InputVector = D3DXVECTOR3(0.0f, 0.0f, moveForward);
		m_Position -= m_InputVector;
		m_LookAt -= m_InputVector;
	}
	void MoveBackward(float moveBackward)
	{
		m_InputVector = D3DXVECTOR3(0.0f, 0.0f, moveBackward);
		m_Position += m_InputVector;
		m_LookAt += m_InputVector;
	}
	D3DXVECTOR3 getCameraPosition(void)
	{
		return m_Position;
	}
	D3DXVECTOR3 getCameraLookAt(void)
	{
		return m_LookAt;
	}

	float getCamXPos(void)
	{
		return m_Position.x;
	}

	float getCamZPos(void)
	{
		return m_Position.z;
	}
	void SetX(float newX)
	{
		m_Position.x = newX;
		
	}
	void SetZ( float newZ)
	{	
		m_Position.z = newZ;
	}

};